import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class RTCVideoPage extends StatefulWidget {
  @override
  _RTCVideoPageState createState() => _RTCVideoPageState();
}

class _RTCVideoPageState extends State<RTCVideoPage> {

  final String _viewType = Platform.isIOS ? 'avd_video_render' : 'avd_video_render';

  @override
  void initState() {
    final MethodChannel _channel = MethodChannel('avd_video_view_channel');
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    if (Platform.isIOS) {
      return UiKitView(
        viewType: _viewType,
        creationParams: {},
        creationParamsCodec: StandardMessageCodec(),
      );
    } else {
      return Container();
    }
  }
}
